package array;

public class ArrayCloneMain {
	
	public static void main(String[] args) {
		
		int[] source = {5,4,6,9,7,9};
		int[] target = source.clone();
		
		// source
		for (int i = 0; i < source.length; i++) {
			System.out.println("source[" + i + "]: " +
					source[i]);
		}
		
		System.out.println();
		
		// target
		for (int i = 0; i < target.length; i++) {
			System.out.println("target[" + i + "]: " +
					target[i]);
		}
		
		System.out.println();
		
		System.out.println("source 참조값: " + source.hashCode());
		System.out.println("target 참조값: " + target.hashCode());
		
	}
	
}
